#ifndef TRAITEMENT_H
#define TRAITEMENT_H


typedef struct requete_t{
  enum m{pas_methode=-1, get=0, head=1, post=2} methode; 
  char *url;
  enum p {pas_protocole=-1, http0_9=0 ,http1_0=1, http2_0=2} protocole;
  enum e{pas_entete=-1, Accept_Encoding=0, Authorization=1, Content_Encoding=2, Content_Length=3, User_Agent=4} entete;
} *requete_t;

extern requete_t creer_requete(void);
extern void liberer_requete(requete_t self);
extern char *recupere_requete(int fdsock);
extern requete_t traiter_requete(char *requete_recue);
extern int requete_bonne(requete_t r);
extern int protocole_09(char *premiere_ligne);

#endif
